package com.techfengs.chapter04;

public class TernaryOperator {
  public static void main (String[] args) {
    int a = 10;
    int b = 99;
    int rlt = (a>b) ? a++ : b--;
    System.out.println(a);
    System.out.println(b);
    System.out.println(rlt);

    rlt = (a<b) ? a++ : b--;
    System.out.println(a);
    System.out.println(b);
    System.out.println(rlt);
  }
}
